<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="common">
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="container-fluid">
    <!-- 	导航栏 -->
    <nav class="navbar navbar-inverse">
        <div class="container">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">大麦后台管理系统</a>
            </div>
        </div>
    </nav>
    <div class="row">
        <div class="col-md-2">
            <ul id="recTree"></ul>
        </div>
        <div class="col-md-9">
            <div id="myTabs">
                <!-- 新选项卡 -->
                <ul class="nav nav-tabs" id="tablist">
                    <li role="presentation" class="active">
                        <a href="#home" role="tab" data-toggle="tab">欢迎</a>
                    </li>
                </ul>

                <!-- 选项卡下内容 -->
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="home">
                        <img width="100%" height="100%" src="/js/images/bg.png">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    $.ajax({
        url:"tree/getRecTree?pid=0",
        success:function(data){
            $("#recTree").treeview({
                data:data,
                onNodeSelected:function(event, node){
                    if(node.url!=null &&node.url!=""){
                        var pm = document.body.clientHeight;
                        $.addtabs({iframeHeight:2000})
                        $.addtabs.add({
                            id:node.id,
                            title:node.text,
                            url:'jumpPage/jumpPage?page='+node.url

                        })
                    }
                }
            })
        }
    })
</script>
</html>